package cn.wolfcode.p2p.business.service;

import cn.wolfcode.p2p.base.domain.LoginInfo;
import cn.wolfcode.p2p.business.domain.BidRequest;

import java.math.BigDecimal;
/**
 * 投标
 */
public interface IBidService {
    /**
     * 保存一条投标记录
     * @param amount
     * @param br
     * @param loginInfo
     */
    void save(BigDecimal amount, BidRequest br, LoginInfo loginInfo);

    /**
     * 批量跟新状态为满标一审
     * @param bidRequestId //借款对象id
     * @param bidRequestState //审核状态
     */
    void batchBidRequestState(Long bidRequestId, Integer bidRequestState);

    /**
     * 用户对当前借款的总投标
     * @param
     * @param
     * @return
     */
    BigDecimal getUserBid(Long bidRequestId, Long bidUserId);

    /**
     * 投标对象改为已还清

     */
    void batchUpdateStateByBidRequestId(Long bidRequestId, int bidRequestState);
}
